package com.mooco.dongba.sys.common.util;

import com.mooco.dongba.sys.pojo.SysUser;
import org.apache.shiro.SecurityUtils;

public class ShiroUtils {
    public static SysUser getUser() {
        return (SysUser) SecurityUtils.getSubject().getPrincipal();
    }

    public String getUsername() {
        return getUser().getUsername();
    }
}
